package com.qingzhuge.sys.entity;

import com.qingzhuge.entity.BasePkLongEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

/**
 * @author : zero.xiao
 * @description : 系统配置信息
 * @date :2018/6/8 0008 下午 14:55
 * @modified :
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_config")
public class SysConfig extends BasePkLongEntity {
    private static final long serialVersionUID = -4356710065894358572L;
    @NotBlank(message = "参数名不能为空")
    @Column(name="sys_key",length = 64)
    private String key;
    @NotBlank(message = "参数值不能为空")
    @Column(name="sys_value",length = 1000)
    private String value;

    public SysConfig() {
    }

    public SysConfig(@NotBlank(message = "参数名不能为空") String key, @NotBlank(message = "参数值不能为空") String value) {
        this.key = key;
        this.value = value;
    }
}
